package han.cirno.corrupt.util

import java.util.regex.Pattern

object RegexUtil {
    fun matchFirst(regex:String, text:String):String?{
        val pattern = Pattern.compile(regex)
        val matcher = pattern.matcher(text)
        if (!matcher.find())return null
        return matcher.group(0)
    }
}